package com.codeyang.feign;

import com.codeyang.domain.Prod;
import com.codeyang.feign.hystrix.IndexImgProdFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 描述: 远程调用 商品服务
 *
 * @author CodeYang_Site
 * @version 2021/5/26 15:05
 */
@FeignClient(value = "product-service", fallback = IndexImgProdFeignHystrix.class)
public interface IndexImgProdFeign {

    /**
     * 远程调用根据商品id查询商品信息
     *
     * @param prodId
     * @return
     */
    @GetMapping("prod/prod/getProdInfoById")
    Prod getProdInfoById(@RequestParam Long prodId);

}
